
import 'dart:io';

import 'package:get/get.dart';

import '../../fluttergromore/plugin/ts_plugin.dart';

class WebViewLogic extends GetxController{

  String? webUrl;
  String? title;
  bool isLoading = false;
  RxDouble webProgress = 0.0.obs;
  RxString rxTitle = "".obs;
  Map<String, dynamic>? webParams;

  @override
  void onInit() {
    Map argument = Get.arguments;
    webUrl = argument['webUrl'] ?? '';
    title = argument['title'] ?? '';
    webParams = argument['params'] ?? {};
    rxTitle.value = title ?? "";
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
    if (Platform.isAndroid) {
      //标记隐私协议
      TsPlugin.setCheckPrivacy();
    }
  }


}